#!/usr/bin/env python
# -*- coding: utf-8 -*-
#coding=utf8

# 本文件由自动工具 proto.py 自动生成，请勿修改
# filename msg3000_csbuf.py
# package ptl

from ptl.base_csbuf import *


# message RespBattleTeams
class RespBattleTeams:
	def __init__(self):
		self.protoid = 3000
		self.arrBattleTeams = []

	def Marshal(writer):
		countarrBattleTeams = len(self.arrBattleTeams)
		writer.setArray(countarrBattleTeams, 1)
		for i in range(countarrBattleTeams):
			writer.setMessage(0)
			self.arrBattleTeams[i].Marshal(writer)
			writer.endSetMessage()

	def Unmarshal( reader):
		for i in range(reader.getArray(1)):
			msg = BattleTeams() 
			reader.getMessage(0)
			msg.Unmarshal(reader)
			reader.endGetMessage()
			self.arrBattleTeams.append(msg)
# message Req3001
class Req3001:
	def __init__(self):
		self.protoid = 3001
		self.battleType = 0
		self.playerId = 0
		self.pvpRoomInfo = PVPRoomInfo()

	def Marshal(writer):
		writer.setUint8(self.battleType, 1)
		writer.setUint32(self.playerId, 2)
		writer.setMessage(3)
		self.pvpRoomInfo.Marshal(writer)
		writer.endSetMessage()

	def Unmarshal( reader):
		self.battleType = reader.getUint8(1)
		self.playerId = reader.getUint32(2)
		reader.getMessage(3)
		self.pvpRoomInfo.Unmarshal(reader)
		reader.endGetMessage()
# message Req3002
class Req3002:
	def __init__(self):
		self.protoid = 3002
		self.playerId = 0
		self.status = 0
		self.battleType = 0

	def Marshal(writer):
		writer.setUint32(self.playerId, 1)
		writer.setUint8(self.status, 2)
		writer.setUint8(self.battleType, 3)

	def Unmarshal( reader):
		self.playerId = reader.getUint32(1)
		self.status = reader.getUint8(2)
		self.battleType = reader.getUint8(3)
# message Resp3002
class Resp3002:
	def __init__(self):
		self.protoid = 3002
		self.playerId = 0
		self.status = 0

	def Marshal(writer):
		writer.setUint32(self.playerId, 1)
		writer.setUint8(self.status, 2)

	def Unmarshal( reader):
		self.playerId = reader.getUint32(1)
		self.status = reader.getUint8(2)
# message Req3003
class Req3003:
	def __init__(self):
		self.protoid = 3003
		self.playerId = 0
		self.state = 0
		self.battleType = 0
		self.bpUUID = ""

	def Marshal(writer):
		writer.setUint32(self.playerId, 1)
		writer.setUint8(self.state, 2)
		writer.setUint8(self.battleType, 3)
		writer.setString(self.bpUUID, 4)

	def Unmarshal( reader):
		self.playerId = reader.getUint32(1)
		self.state = reader.getUint8(2)
		self.battleType = reader.getUint8(3)
		self.bpUUID = reader.getString(4)
# message Resp3003
class Resp3003:
	def __init__(self):
		self.protoid = 3003
		self.playerId = 0
		self.state = 0
		self.bpUUID = ""

	def Marshal(writer):
		writer.setUint32(self.playerId, 1)
		writer.setUint8(self.state, 2)
		writer.setString(self.bpUUID, 3)

	def Unmarshal( reader):
		self.playerId = reader.getUint32(1)
		self.state = reader.getUint8(2)
		self.bpUUID = reader.getString(3)
# message Req3005
class Req3005:
	def __init__(self):
		self.protoid = 3005
		self.playerId = 0
		self.battleType = 0

	def Marshal(writer):
		writer.setUint32(self.playerId, 1)
		writer.setUint8(self.battleType, 2)

	def Unmarshal( reader):
		self.playerId = reader.getUint32(1)
		self.battleType = reader.getUint8(2)
# message Resp3005
class Resp3005:
	def __init__(self):
		self.protoid = 3005
		pass

	def Marshal(writer):
		pass

	def Unmarshal( reader):
		pass
# message Req3006
class Req3006:
	def __init__(self):
		self.protoid = 3006
		self.isRight = 0
		self.mvType = 0
		self.curRound = 0
		self.pos = Point()
		self.bpUUID = ""
		self.playerId = 0
		self.battleType = 0

	def Marshal(writer):
		writer.setBool(self.isRight, 1)
		writer.setUint8(self.mvType, 2)
		writer.setUint16(self.curRound, 3)
		writer.setMessage(4)
		self.pos.Marshal(writer)
		writer.endSetMessage()
		writer.setString(self.bpUUID, 5)
		writer.setUint32(self.playerId, 6)
		writer.setUint8(self.battleType, 7)

	def Unmarshal( reader):
		self.isRight = reader.getBool(1)
		self.mvType = reader.getUint8(2)
		self.curRound = reader.getUint16(3)
		reader.getMessage(4)
		self.pos.Unmarshal(reader)
		reader.endGetMessage()
		self.bpUUID = reader.getString(5)
		self.playerId = reader.getUint32(6)
		self.battleType = reader.getUint8(7)
# message Resp3006
class Resp3006:
	def __init__(self):
		self.protoid = 3006
		self.moveable = 0
		self.angle = 0
		self.pos = Point()
		self.curEp = 0
		self.playerId = 0
		self.bpUUID = ""

	def Marshal(writer):
		writer.setBool(self.moveable, 1)
		writer.setInt16(self.angle, 2)
		writer.setMessage(3)
		self.pos.Marshal(writer)
		writer.endSetMessage()
		writer.setUint16(self.curEp, 4)
		writer.setUint32(self.playerId, 5)
		writer.setString(self.bpUUID, 6)

	def Unmarshal( reader):
		self.moveable = reader.getBool(1)
		self.angle = reader.getInt16(2)
		reader.getMessage(3)
		self.pos.Unmarshal(reader)
		reader.endGetMessage()
		self.curEp = reader.getUint16(4)
		self.playerId = reader.getUint32(5)
		self.bpUUID = reader.getString(6)
# message Actors
class Actors:
	def __init__(self):
		self.protoid = 0
		self.curEp = 0
		self.priority = 0
		self.curAnger = 0
		self.bpUUID = ""
		self.playerId = 0

	def Marshal(writer):
		writer.setUint16(self.curEp, 1)
		writer.setUint16(self.priority, 2)
		writer.setUint16(self.curAnger, 3)
		writer.setString(self.bpUUID, 4)
		writer.setUint32(self.playerId, 5)

	def Unmarshal( reader):
		self.curEp = reader.getUint16(1)
		self.priority = reader.getUint16(2)
		self.curAnger = reader.getUint16(3)
		self.bpUUID = reader.getString(4)
		self.playerId = reader.getUint32(5)
# message Req3007
class Req3007:
	def __init__(self):
		self.protoid = 3007
		self.playerId = 0
		self.battleType = 0

	def Marshal(writer):
		writer.setUint32(self.playerId, 1)
		writer.setUint8(self.battleType, 2)

	def Unmarshal( reader):
		self.playerId = reader.getUint32(1)
		self.battleType = reader.getUint8(2)
# message Resp3007
class Resp3007:
	def __init__(self):
		self.protoid = 3007
		self.wind = 0
		self.curRound = 0
		self.roundTime = 0
		self.arrOldActors = []
		self.arrCurActors = []

	def Marshal(writer):
		writer.setInt8(self.wind, 1)
		writer.setUint16(self.curRound, 2)
		writer.setUint16(self.roundTime, 3)
		countarrOldActors = len(self.arrOldActors)
		writer.setArray(countarrOldActors, 4)
		for i in range(countarrOldActors):
			writer.setMessage(0)
			self.arrOldActors[i].Marshal(writer)
			writer.endSetMessage()
		countarrCurActors = len(self.arrCurActors)
		writer.setArray(countarrCurActors, 5)
		for i in range(countarrCurActors):
			writer.setMessage(0)
			self.arrCurActors[i].Marshal(writer)
			writer.endSetMessage()

	def Unmarshal( reader):
		self.wind = reader.getInt8(1)
		self.curRound = reader.getUint16(2)
		self.roundTime = reader.getUint16(3)
		for i in range(reader.getArray(4)):
			msg = Actors() 
			reader.getMessage(0)
			msg.Unmarshal(reader)
			reader.endGetMessage()
			self.arrOldActors.append(msg)
		for i in range(reader.getArray(5)):
			msg = Actors() 
			reader.getMessage(0)
			msg.Unmarshal(reader)
			reader.endGetMessage()
			self.arrCurActors.append(msg)
# message Resp3008
class Resp3008:
	def __init__(self):
		self.protoid = 3008
		pass

	def Marshal(writer):
		pass

	def Unmarshal( reader):
		pass
# message Attr
class Attr:
	def __init__(self):
		self.protoid = 0
		self.key = 0
		self.value = 0

	def Marshal(writer):
		writer.setUint8(self.key, 1)
		writer.setInt32(self.value, 2)

	def Unmarshal( reader):
		self.key = reader.getUint8(1)
		self.value = reader.getInt32(2)
# message SkillEffChgs
class SkillEffChgs:
	def __init__(self):
		self.protoid = 0
		self.skillId = 0
		self.arrAttr = []

	def Marshal(writer):
		writer.setUint32(self.skillId, 1)
		countarrAttr = len(self.arrAttr)
		writer.setArray(countarrAttr, 2)
		for i in range(countarrAttr):
			writer.setMessage(0)
			self.arrAttr[i].Marshal(writer)
			writer.endSetMessage()

	def Unmarshal( reader):
		self.skillId = reader.getUint32(1)
		for i in range(reader.getArray(2)):
			msg = Attr() 
			reader.getMessage(0)
			msg.Unmarshal(reader)
			reader.endGetMessage()
			self.arrAttr.append(msg)
# message SkillBuffObj
class SkillBuffObj:
	def __init__(self):
		self.protoid = 3251
		self.objId = ""
		self.skillId = 0
		self.buffId = 0
		self.casterId = ""
		self.pos = Point()
		self.state = 0
		self.round = 0

	def Marshal(writer):
		writer.setString(self.objId, 1)
		writer.setUint32(self.skillId, 2)
		writer.setUint32(self.buffId, 3)
		writer.setString(self.casterId, 4)
		writer.setMessage(5)
		self.pos.Marshal(writer)
		writer.endSetMessage()
		writer.setUint8(self.state, 6)
		writer.setInt8(self.round, 7)

	def Unmarshal( reader):
		self.objId = reader.getString(1)
		self.skillId = reader.getUint32(2)
		self.buffId = reader.getUint32(3)
		self.casterId = reader.getString(4)
		reader.getMessage(5)
		self.pos.Unmarshal(reader)
		reader.endGetMessage()
		self.state = reader.getUint8(6)
		self.round = reader.getInt8(7)
# message ExtInfo
class ExtInfo:
	def __init__(self):
		self.protoid = 0
		self.handleMap = 0
		self.handleDamage = 0
		self.gotoTarget = 0

	def Marshal(writer):
		writer.setBool(self.handleMap, 1)
		writer.setBool(self.handleDamage, 2)
		writer.setBool(self.gotoTarget, 3)

	def Unmarshal( reader):
		self.handleMap = reader.getBool(1)
		self.handleDamage = reader.getBool(2)
		self.gotoTarget = reader.getBool(3)
# message FireRet
class FireRet:
	def __init__(self):
		self.protoid = 0
		self.bulletId = 0
		self.extInfo = ExtInfo()
		self.arrPoint = []
		self.updates = []

	def Marshal(writer):
		writer.setUint32(self.bulletId, 1)
		writer.setMessage(2)
		self.extInfo.Marshal(writer)
		writer.endSetMessage()
		countarrPoint = len(self.arrPoint)
		writer.setArray(countarrPoint, 3)
		for i in range(countarrPoint):
			writer.setMessage(0)
			self.arrPoint[i].Marshal(writer)
			writer.endSetMessage()
		countupdates = len(self.updates)
		writer.setArray(countupdates, 4)
		for i in range(countupdates):
			writer.setMessage(0)
			self.updates[i].Marshal(writer)
			writer.endSetMessage()

	def Unmarshal( reader):
		self.bulletId = reader.getUint32(1)
		reader.getMessage(2)
		self.extInfo.Unmarshal(reader)
		reader.endGetMessage()
		for i in range(reader.getArray(3)):
			msg = Point() 
			reader.getMessage(0)
			msg.Unmarshal(reader)
			reader.endGetMessage()
			self.arrPoint.append(msg)
		for i in range(reader.getArray(4)):
			msg = Resp3250() 
			reader.getMessage(0)
			msg.Unmarshal(reader)
			reader.endGetMessage()
			self.updates.append(msg)
# message FireCount
class FireCount:
	def __init__(self):
		self.protoid = 0
		self.arrFireRet = []

	def Marshal(writer):
		countarrFireRet = len(self.arrFireRet)
		writer.setArray(countarrFireRet, 1)
		for i in range(countarrFireRet):
			writer.setMessage(0)
			self.arrFireRet[i].Marshal(writer)
			writer.endSetMessage()

	def Unmarshal( reader):
		for i in range(reader.getArray(1)):
			msg = FireRet() 
			reader.getMessage(0)
			msg.Unmarshal(reader)
			reader.endGetMessage()
			self.arrFireRet.append(msg)
# message Req3009
class Req3009:
	def __init__(self):
		self.protoid = 3009
		self.direction = 0
		self.curRound = 0
		self.angle = 0
		self.power = 0
		self.bpUUID = ""
		self.playerId = 0
		self.pos = Point()
		self.battleType = 0

	def Marshal(writer):
		writer.setUint8(self.direction, 1)
		writer.setUint16(self.curRound, 2)
		writer.setInt16(self.angle, 3)
		writer.setUint8(self.power, 4)
		writer.setString(self.bpUUID, 5)
		writer.setUint32(self.playerId, 6)
		writer.setMessage(7)
		self.pos.Marshal(writer)
		writer.endSetMessage()
		writer.setUint8(self.battleType, 8)

	def Unmarshal( reader):
		self.direction = reader.getUint8(1)
		self.curRound = reader.getUint16(2)
		self.angle = reader.getInt16(3)
		self.power = reader.getUint8(4)
		self.bpUUID = reader.getString(5)
		self.playerId = reader.getUint32(6)
		reader.getMessage(7)
		self.pos.Unmarshal(reader)
		reader.endGetMessage()
		self.battleType = reader.getUint8(8)
# message Resp3009
class Resp3009:
	def __init__(self):
		self.protoid = 3009
		self.direction = 0
		self.bpUUID = ""
		self.playerId = 0
		self.arrFireCount = []
		self.guideTarget = ""

	def Marshal(writer):
		writer.setUint8(self.direction, 1)
		writer.setString(self.bpUUID, 2)
		writer.setUint32(self.playerId, 3)
		countarrFireCount = len(self.arrFireCount)
		writer.setArray(countarrFireCount, 4)
		for i in range(countarrFireCount):
			writer.setMessage(0)
			self.arrFireCount[i].Marshal(writer)
			writer.endSetMessage()
		writer.setString(self.guideTarget, 5)

	def Unmarshal( reader):
		self.direction = reader.getUint8(1)
		self.bpUUID = reader.getString(2)
		self.playerId = reader.getUint32(3)
		for i in range(reader.getArray(4)):
			msg = FireCount() 
			reader.getMessage(0)
			msg.Unmarshal(reader)
			reader.endGetMessage()
			self.arrFireCount.append(msg)
		self.guideTarget = reader.getString(5)
# message Req3010
class Req3010:
	def __init__(self):
		self.protoid = 3010
		self.endType = 0
		self.direction = 0
		self.curRound = 0
		self.bpUUID = ""
		self.playerId = 0
		self.battleType = 0

	def Marshal(writer):
		writer.setUint8(self.endType, 1)
		writer.setUint8(self.direction, 2)
		writer.setUint16(self.curRound, 3)
		writer.setString(self.bpUUID, 4)
		writer.setUint32(self.playerId, 5)
		writer.setUint8(self.battleType, 6)

	def Unmarshal( reader):
		self.endType = reader.getUint8(1)
		self.direction = reader.getUint8(2)
		self.curRound = reader.getUint16(3)
		self.bpUUID = reader.getString(4)
		self.playerId = reader.getUint32(5)
		self.battleType = reader.getUint8(6)
# message Resp3010
class Resp3010:
	def __init__(self):
		self.protoid = 3010
		self.endType = 0
		self.direction = 0
		self.bpUUID = ""
		self.playerId = 0
		self.arrAttr = []

	def Marshal(writer):
		writer.setUint8(self.endType, 1)
		writer.setUint8(self.direction, 2)
		writer.setString(self.bpUUID, 3)
		writer.setUint32(self.playerId, 4)
		countarrAttr = len(self.arrAttr)
		writer.setArray(countarrAttr, 5)
		for i in range(countarrAttr):
			writer.setMessage(0)
			self.arrAttr[i].Marshal(writer)
			writer.endSetMessage()

	def Unmarshal( reader):
		self.endType = reader.getUint8(1)
		self.direction = reader.getUint8(2)
		self.bpUUID = reader.getString(3)
		self.playerId = reader.getUint32(4)
		for i in range(reader.getArray(5)):
			msg = Attr() 
			reader.getMessage(0)
			msg.Unmarshal(reader)
			reader.endGetMessage()
			self.arrAttr.append(msg)
# message Req3011
class Req3011:
	def __init__(self):
		self.protoid = 3011
		self.status = 0
		self.curRound = 0
		self.curEp = 0
		self.bpUUID = ""
		self.playerId = 0
		self.pos = Point()
		self.battleType = 0
		self.angle = 0

	def Marshal(writer):
		writer.setUint8(self.status, 1)
		writer.setUint16(self.curRound, 2)
		writer.setUint16(self.curEp, 3)
		writer.setString(self.bpUUID, 4)
		writer.setUint32(self.playerId, 5)
		writer.setMessage(6)
		self.pos.Marshal(writer)
		writer.endSetMessage()
		writer.setUint8(self.battleType, 7)
		writer.setInt16(self.angle, 8)

	def Unmarshal( reader):
		self.status = reader.getUint8(1)
		self.curRound = reader.getUint16(2)
		self.curEp = reader.getUint16(3)
		self.bpUUID = reader.getString(4)
		self.playerId = reader.getUint32(5)
		reader.getMessage(6)
		self.pos.Unmarshal(reader)
		reader.endGetMessage()
		self.battleType = reader.getUint8(7)
		self.angle = reader.getInt16(8)
# message Resp3011
class Resp3011:
	def __init__(self):
		self.protoid = 3011
		self.status = 0
		self.curEp = 0
		self.bpUUID = ""
		self.playerId = 0
		self.pos = Point()

	def Marshal(writer):
		writer.setUint8(self.status, 1)
		writer.setUint16(self.curEp, 2)
		writer.setString(self.bpUUID, 3)
		writer.setUint32(self.playerId, 4)
		writer.setMessage(5)
		self.pos.Marshal(writer)
		writer.endSetMessage()

	def Unmarshal( reader):
		self.status = reader.getUint8(1)
		self.curEp = reader.getUint16(2)
		self.bpUUID = reader.getString(3)
		self.playerId = reader.getUint32(4)
		reader.getMessage(5)
		self.pos.Unmarshal(reader)
		reader.endGetMessage()
# message Req3012
class Req3012:
	def __init__(self):
		self.protoid = 3012
		self.dir = 0
		self.curRound = 0
		self.bpUUID = ""
		self.playerId = 0
		self.battleType = 0

	def Marshal(writer):
		writer.setUint8(self.dir, 1)
		writer.setUint16(self.curRound, 2)
		writer.setString(self.bpUUID, 3)
		writer.setUint32(self.playerId, 4)
		writer.setUint8(self.battleType, 5)

	def Unmarshal( reader):
		self.dir = reader.getUint8(1)
		self.curRound = reader.getUint16(2)
		self.bpUUID = reader.getString(3)
		self.playerId = reader.getUint32(4)
		self.battleType = reader.getUint8(5)
# message Resp3012
class Resp3012:
	def __init__(self):
		self.protoid = 3012
		self.dir = 0
		self.bpUUID = ""
		self.playerId = 0

	def Marshal(writer):
		writer.setUint8(self.dir, 1)
		writer.setString(self.bpUUID, 2)
		writer.setUint32(self.playerId, 3)

	def Unmarshal( reader):
		self.dir = reader.getUint8(1)
		self.bpUUID = reader.getString(2)
		self.playerId = reader.getUint32(3)
# message Req3013
class Req3013:
	def __init__(self):
		self.protoid = 3013
		self.playerId = 0
		self.type = 0
		self.pos = Point()
		self.dir = 0
		self.isDead = 0
		self.angle = 0
		self.step = 0
		self.battleType = 0

	def Marshal(writer):
		writer.setUint32(self.playerId, 1)
		writer.setUint8(self.type, 2)
		writer.setMessage(3)
		self.pos.Marshal(writer)
		writer.endSetMessage()
		writer.setUint8(self.dir, 4)
		writer.setBool(self.isDead, 5)
		writer.setInt16(self.angle, 6)
		writer.setInt8(self.step, 7)
		writer.setUint8(self.battleType, 8)

	def Unmarshal( reader):
		self.playerId = reader.getUint32(1)
		self.type = reader.getUint8(2)
		reader.getMessage(3)
		self.pos.Unmarshal(reader)
		reader.endGetMessage()
		self.dir = reader.getUint8(4)
		self.isDead = reader.getBool(5)
		self.angle = reader.getInt16(6)
		self.step = reader.getInt8(7)
		self.battleType = reader.getUint8(8)
# message Resp3013
class Resp3013:
	def __init__(self):
		self.protoid = 3013
		self.playerId = 0
		self.type = 0
		self.pos = Point()
		self.dir = 0
		self.isDead = 0
		self.angle = 0
		self.step = 0

	def Marshal(writer):
		writer.setUint32(self.playerId, 1)
		writer.setUint8(self.type, 2)
		writer.setMessage(3)
		self.pos.Marshal(writer)
		writer.endSetMessage()
		writer.setUint8(self.dir, 4)
		writer.setBool(self.isDead, 5)
		writer.setInt16(self.angle, 6)
		writer.setInt8(self.step, 7)

	def Unmarshal( reader):
		self.playerId = reader.getUint32(1)
		self.type = reader.getUint8(2)
		reader.getMessage(3)
		self.pos.Unmarshal(reader)
		reader.endGetMessage()
		self.dir = reader.getUint8(4)
		self.isDead = reader.getBool(5)
		self.angle = reader.getInt16(6)
		self.step = reader.getInt8(7)
# message Req3014
class Req3014:
	def __init__(self):
		self.protoid = 3014
		self.playerId = 0
		self.dir = 0
		self.battleType = 0
		self.bpUUID = ""

	def Marshal(writer):
		writer.setUint32(self.playerId, 1)
		writer.setUint8(self.dir, 2)
		writer.setUint8(self.battleType, 3)
		writer.setString(self.bpUUID, 4)

	def Unmarshal( reader):
		self.playerId = reader.getUint32(1)
		self.dir = reader.getUint8(2)
		self.battleType = reader.getUint8(3)
		self.bpUUID = reader.getString(4)
# message Resp3014
class Resp3014:
	def __init__(self):
		self.protoid = 3014
		self.playerId = 0
		self.dir = 0
		self.bpUUID = ""

	def Marshal(writer):
		writer.setUint32(self.playerId, 1)
		writer.setUint8(self.dir, 2)
		writer.setString(self.bpUUID, 3)

	def Unmarshal( reader):
		self.playerId = reader.getUint32(1)
		self.dir = reader.getUint8(2)
		self.bpUUID = reader.getString(3)
# message Req3015
class Req3015:
	def __init__(self):
		self.protoid = 3015
		self.playerId = 0
		self.bpUUID = ""
		self.battleType = 0

	def Marshal(writer):
		writer.setUint32(self.playerId, 1)
		writer.setString(self.bpUUID, 2)
		writer.setUint8(self.battleType, 7)

	def Unmarshal( reader):
		self.playerId = reader.getUint32(1)
		self.bpUUID = reader.getString(2)
		self.battleType = reader.getUint8(7)
# message Resp3015
class Resp3015:
	def __init__(self):
		self.protoid = 3015
		self.playerId = 0
		self.bpUUID = ""

	def Marshal(writer):
		writer.setUint32(self.playerId, 1)
		writer.setString(self.bpUUID, 2)

	def Unmarshal( reader):
		self.playerId = reader.getUint32(1)
		self.bpUUID = reader.getString(2)
# message Req3016
class Req3016:
	def __init__(self):
		self.protoid = 3016
		self.playerId = 0
		self.bpUUID = ""
		self.battleType = 0

	def Marshal(writer):
		writer.setUint32(self.playerId, 1)
		writer.setString(self.bpUUID, 2)
		writer.setUint8(self.battleType, 7)

	def Unmarshal( reader):
		self.playerId = reader.getUint32(1)
		self.bpUUID = reader.getString(2)
		self.battleType = reader.getUint8(7)
# message Resp3016
class Resp3016:
	def __init__(self):
		self.protoid = 3016
		self.playerId = 0
		self.bpUUID = ""

	def Marshal(writer):
		writer.setUint32(self.playerId, 1)
		writer.setString(self.bpUUID, 2)

	def Unmarshal( reader):
		self.playerId = reader.getUint32(1)
		self.bpUUID = reader.getString(2)
# message Resp3017
class Resp3017:
	def __init__(self):
		self.protoid = 3017
		self.playerId = 0
		self.bpUUID = ""

	def Marshal(writer):
		writer.setUint32(self.playerId, 1)
		writer.setString(self.bpUUID, 2)

	def Unmarshal( reader):
		self.playerId = reader.getUint32(1)
		self.bpUUID = reader.getString(2)
# message Req3100
class Req3100:
	def __init__(self):
		self.protoid = 3100
		self.curRound = 0
		self.skillId = 0
		self.bpUUID = ""
		self.playerId = 0
		self.battleType = 0

	def Marshal(writer):
		writer.setUint16(self.curRound, 1)
		writer.setUint32(self.skillId, 2)
		writer.setString(self.bpUUID, 3)
		writer.setUint32(self.playerId, 4)
		writer.setUint8(self.battleType, 5)

	def Unmarshal( reader):
		self.curRound = reader.getUint16(1)
		self.skillId = reader.getUint32(2)
		self.bpUUID = reader.getString(3)
		self.playerId = reader.getUint32(4)
		self.battleType = reader.getUint8(5)
# message Resp3100
class Resp3100:
	def __init__(self):
		self.protoid = 3100
		self.useRet = 0
		self.skillId = 0
		self.bpUUID = ""
		self.playerId = 0
		self.seChg = SkillEffChgs()
		self.updates = []

	def Marshal(writer):
		writer.setUint8(self.useRet, 1)
		writer.setUint32(self.skillId, 2)
		writer.setString(self.bpUUID, 3)
		writer.setUint32(self.playerId, 4)
		writer.setMessage(5)
		self.seChg.Marshal(writer)
		writer.endSetMessage()
		countupdates = len(self.updates)
		writer.setArray(countupdates, 6)
		for i in range(countupdates):
			writer.setMessage(0)
			self.updates[i].Marshal(writer)
			writer.endSetMessage()

	def Unmarshal( reader):
		self.useRet = reader.getUint8(1)
		self.skillId = reader.getUint32(2)
		self.bpUUID = reader.getString(3)
		self.playerId = reader.getUint32(4)
		reader.getMessage(5)
		self.seChg.Unmarshal(reader)
		reader.endGetMessage()
		for i in range(reader.getArray(6)):
			msg = Resp3250() 
			reader.getMessage(0)
			msg.Unmarshal(reader)
			reader.endGetMessage()
			self.updates.append(msg)
# message KillInfo
class KillInfo:
	def __init__(self):
		self.protoid = 0
		self.id = 0
		self.infoType = 0
		self.count = 0

	def Marshal(writer):
		writer.setUint32(self.id, 1)
		writer.setUint8(self.infoType, 2)
		writer.setUint32(self.count, 3)

	def Unmarshal( reader):
		self.id = reader.getUint32(1)
		self.infoType = reader.getUint8(2)
		self.count = reader.getUint32(3)
# message EndInfo
class EndInfo:
	def __init__(self):
		self.protoid = 0
		self.playerId = 0
		self.killList = []
		self.killed = KillInfo()
		self.skillUsedTimes = []
		self.damage = 0
		self.injury = 0

	def Marshal(writer):
		writer.setUint32(self.playerId, 1)
		countkillList = len(self.killList)
		writer.setArray(countkillList, 2)
		for i in range(countkillList):
			writer.setMessage(0)
			self.killList[i].Marshal(writer)
			writer.endSetMessage()
		writer.setMessage(3)
		self.killed.Marshal(writer)
		writer.endSetMessage()
		countskillUsedTimes = len(self.skillUsedTimes)
		writer.setArray(countskillUsedTimes, 4)
		for i in range(countskillUsedTimes):
			writer.setMessage(0)
			self.skillUsedTimes[i].Marshal(writer)
			writer.endSetMessage()
		writer.setInt32(self.damage, 5)
		writer.setInt32(self.injury, 6)

	def Unmarshal( reader):
		self.playerId = reader.getUint32(1)
		for i in range(reader.getArray(2)):
			msg = KillInfo() 
			reader.getMessage(0)
			msg.Unmarshal(reader)
			reader.endGetMessage()
			self.killList.append(msg)
		reader.getMessage(3)
		self.killed.Unmarshal(reader)
		reader.endGetMessage()
		for i in range(reader.getArray(4)):
			msg = PairData() 
			reader.getMessage(0)
			msg.Unmarshal(reader)
			reader.endGetMessage()
			self.skillUsedTimes.append(msg)
		self.damage = reader.getInt32(5)
		self.injury = reader.getInt32(6)
# message Req3101
class Req3101:
	def __init__(self):
		self.protoid = 3101
		self.exitType = 0
		self.curRound = 0
		self.playerId = 0
		self.battleType = 0

	def Marshal(writer):
		writer.setUint8(self.exitType, 1)
		writer.setUint16(self.curRound, 2)
		writer.setUint32(self.playerId, 3)
		writer.setUint8(self.battleType, 4)

	def Unmarshal( reader):
		self.exitType = reader.getUint8(1)
		self.curRound = reader.getUint16(2)
		self.playerId = reader.getUint32(3)
		self.battleType = reader.getUint8(4)
# message Resp3101
class Resp3101:
	def __init__(self):
		self.protoid = 3101
		self.status = 0
		self.winTeamId = 0
		self.failedTeamId = 0
		self.exitPlayerId = 0
		self.exitType = 0
		self.killList = []
		self.killed = KillInfo()
		self.skillUsedTimes = []

	def Marshal(writer):
		writer.setUint8(self.status, 1)
		writer.setUint8(self.winTeamId, 2)
		writer.setUint8(self.failedTeamId, 3)
		writer.setUint32(self.exitPlayerId, 4)
		writer.setUint8(self.exitType, 5)
		countkillList = len(self.killList)
		writer.setArray(countkillList, 6)
		for i in range(countkillList):
			writer.setMessage(0)
			self.killList[i].Marshal(writer)
			writer.endSetMessage()
		writer.setMessage(7)
		self.killed.Marshal(writer)
		writer.endSetMessage()
		countskillUsedTimes = len(self.skillUsedTimes)
		writer.setArray(countskillUsedTimes, 8)
		for i in range(countskillUsedTimes):
			writer.setMessage(0)
			self.skillUsedTimes[i].Marshal(writer)
			writer.endSetMessage()

	def Unmarshal( reader):
		self.status = reader.getUint8(1)
		self.winTeamId = reader.getUint8(2)
		self.failedTeamId = reader.getUint8(3)
		self.exitPlayerId = reader.getUint32(4)
		self.exitType = reader.getUint8(5)
		for i in range(reader.getArray(6)):
			msg = KillInfo() 
			reader.getMessage(0)
			msg.Unmarshal(reader)
			reader.endGetMessage()
			self.killList.append(msg)
		reader.getMessage(7)
		self.killed.Unmarshal(reader)
		reader.endGetMessage()
		for i in range(reader.getArray(8)):
			msg = PairData() 
			reader.getMessage(0)
			msg.Unmarshal(reader)
			reader.endGetMessage()
			self.skillUsedTimes.append(msg)
# message Resp3102
class Resp3102:
	def __init__(self):
		self.protoid = 3102
		self.winTeamId = 0
		self.failedTeamId = 0
		self.infos = []

	def Marshal(writer):
		writer.setUint8(self.winTeamId, 1)
		writer.setUint8(self.failedTeamId, 2)
		countinfos = len(self.infos)
		writer.setArray(countinfos, 3)
		for i in range(countinfos):
			writer.setMessage(0)
			self.infos[i].Marshal(writer)
			writer.endSetMessage()

	def Unmarshal( reader):
		self.winTeamId = reader.getUint8(1)
		self.failedTeamId = reader.getUint8(2)
		for i in range(reader.getArray(3)):
			msg = EndInfo() 
			reader.getMessage(0)
			msg.Unmarshal(reader)
			reader.endGetMessage()
			self.infos.append(msg)
# message Req3103
class Req3103:
	def __init__(self):
		self.protoid = 3103
		self.playerId = 0
		self.battleType = 0

	def Marshal(writer):
		writer.setUint32(self.playerId, 1)
		writer.setUint8(self.battleType, 2)

	def Unmarshal( reader):
		self.playerId = reader.getUint32(1)
		self.battleType = reader.getUint8(2)
# message Resp3103
class Resp3103:
	def __init__(self):
		self.protoid = 3103
		self.playerId = 0
		self.winTeamId = 0
		self.failedTeamId = 0
		self.infos = []

	def Marshal(writer):
		writer.setUint32(self.playerId, 1)
		writer.setUint8(self.winTeamId, 2)
		writer.setUint8(self.failedTeamId, 3)
		countinfos = len(self.infos)
		writer.setArray(countinfos, 4)
		for i in range(countinfos):
			writer.setMessage(0)
			self.infos[i].Marshal(writer)
			writer.endSetMessage()

	def Unmarshal( reader):
		self.playerId = reader.getUint32(1)
		self.winTeamId = reader.getUint8(2)
		self.failedTeamId = reader.getUint8(3)
		for i in range(reader.getArray(4)):
			msg = EndInfo() 
			reader.getMessage(0)
			msg.Unmarshal(reader)
			reader.endGetMessage()
			self.infos.append(msg)
# message Resp3250
class Resp3250:
	def __init__(self):
		self.protoid = 3250
		self.bpUUID = ""
		self.seChg = SkillEffChgs()
		self.arrSkillBuff = []

	def Marshal(writer):
		writer.setString(self.bpUUID, 1)
		writer.setMessage(2)
		self.seChg.Marshal(writer)
		writer.endSetMessage()
		countarrSkillBuff = len(self.arrSkillBuff)
		writer.setArray(countarrSkillBuff, 3)
		for i in range(countarrSkillBuff):
			writer.setMessage(0)
			self.arrSkillBuff[i].Marshal(writer)
			writer.endSetMessage()

	def Unmarshal( reader):
		self.bpUUID = reader.getString(1)
		reader.getMessage(2)
		self.seChg.Unmarshal(reader)
		reader.endGetMessage()
		for i in range(reader.getArray(3)):
			msg = TripleData() 
			reader.getMessage(0)
			msg.Unmarshal(reader)
			reader.endGetMessage()
			self.arrSkillBuff.append(msg)
# message Resp3201
class Resp3201:
	def __init__(self):
		self.protoid = 3201
		self.direction = 0
		self.bpUUID = ""
		self.skillId = 0
		self.updates = []
		self.pos = Point()
		self.buffObjs = []

	def Marshal(writer):
		writer.setUint8(self.direction, 1)
		writer.setString(self.bpUUID, 2)
		writer.setUint32(self.skillId, 3)
		countupdates = len(self.updates)
		writer.setArray(countupdates, 4)
		for i in range(countupdates):
			writer.setMessage(0)
			self.updates[i].Marshal(writer)
			writer.endSetMessage()
		writer.setMessage(5)
		self.pos.Marshal(writer)
		writer.endSetMessage()
		countbuffObjs = len(self.buffObjs)
		writer.setArray(countbuffObjs, 6)
		for i in range(countbuffObjs):
			writer.setMessage(0)
			self.buffObjs[i].Marshal(writer)
			writer.endSetMessage()

	def Unmarshal( reader):
		self.direction = reader.getUint8(1)
		self.bpUUID = reader.getString(2)
		self.skillId = reader.getUint32(3)
		for i in range(reader.getArray(4)):
			msg = Resp3250() 
			reader.getMessage(0)
			msg.Unmarshal(reader)
			reader.endGetMessage()
			self.updates.append(msg)
		reader.getMessage(5)
		self.pos.Unmarshal(reader)
		reader.endGetMessage()
		for i in range(reader.getArray(6)):
			msg = SkillBuffObj() 
			reader.getMessage(0)
			msg.Unmarshal(reader)
			reader.endGetMessage()
			self.buffObjs.append(msg)
# message NpcBornArgs
class NpcBornArgs:
	def __init__(self):
		self.protoid = 0
		self.bpUUID = ""
		self.heroId = 0
		self.pos = Point()
		self.bpi = BattlePlayerInfo()

	def Marshal(writer):
		writer.setString(self.bpUUID, 1)
		writer.setUint32(self.heroId, 2)
		writer.setMessage(3)
		self.pos.Marshal(writer)
		writer.endSetMessage()
		writer.setMessage(4)
		self.bpi.Marshal(writer)
		writer.endSetMessage()

	def Unmarshal( reader):
		self.bpUUID = reader.getString(1)
		self.heroId = reader.getUint32(2)
		reader.getMessage(3)
		self.pos.Unmarshal(reader)
		reader.endGetMessage()
		reader.getMessage(4)
		self.bpi.Unmarshal(reader)
		reader.endGetMessage()
# message AiActionData
class AiActionData:
	def __init__(self):
		self.protoid = 0
		self.data1 = 0
		self.data2 = 0
		self.data3 = 0
		self.data4 = 0
		self.data5 = 0
		self.data6 = 0

	def Marshal(writer):
		writer.setUint32(self.data1, 1)
		writer.setUint32(self.data2, 2)
		writer.setUint32(self.data3, 3)
		writer.setUint32(self.data4, 4)
		writer.setUint32(self.data5, 5)
		writer.setUint32(self.data6, 6)

	def Unmarshal( reader):
		self.data1 = reader.getUint32(1)
		self.data2 = reader.getUint32(2)
		self.data3 = reader.getUint32(3)
		self.data4 = reader.getUint32(4)
		self.data5 = reader.getUint32(5)
		self.data6 = reader.getUint32(6)
# message Resp3203
class Resp3203:
	def __init__(self):
		self.protoid = 3203
		self.arrNpcBornArgs = []

	def Marshal(writer):
		countarrNpcBornArgs = len(self.arrNpcBornArgs)
		writer.setArray(countarrNpcBornArgs, 1)
		for i in range(countarrNpcBornArgs):
			writer.setMessage(0)
			self.arrNpcBornArgs[i].Marshal(writer)
			writer.endSetMessage()

	def Unmarshal( reader):
		for i in range(reader.getArray(1)):
			msg = NpcBornArgs() 
			reader.getMessage(0)
			msg.Unmarshal(reader)
			reader.endGetMessage()
			self.arrNpcBornArgs.append(msg)
# message Resp3202
class Resp3202:
	def __init__(self):
		self.protoid = 3202
		self.bpUUID = ""
		self.actions = []
		self.fires = Resp3201()
		self.borns = Resp3203()
		self.actionIndex = 0

	def Marshal(writer):
		writer.setString(self.bpUUID, 1)
		countactions = len(self.actions)
		writer.setArray(countactions, 2)
		for i in range(countactions):
			writer.setMessage(0)
			self.actions[i].Marshal(writer)
			writer.endSetMessage()
		writer.setMessage(3)
		self.fires.Marshal(writer)
		writer.endSetMessage()
		writer.setMessage(4)
		self.borns.Marshal(writer)
		writer.endSetMessage()
		writer.setUint8(self.actionIndex, 5)

	def Unmarshal( reader):
		self.bpUUID = reader.getString(1)
		for i in range(reader.getArray(2)):
			msg = AiActionData() 
			reader.getMessage(0)
			msg.Unmarshal(reader)
			reader.endGetMessage()
			self.actions.append(msg)
		reader.getMessage(3)
		self.fires.Unmarshal(reader)
		reader.endGetMessage()
		reader.getMessage(4)
		self.borns.Unmarshal(reader)
		reader.endGetMessage()
		self.actionIndex = reader.getUint8(5)
# message Resp3211
class Resp3211:
	def __init__(self):
		self.protoid = 3211
		pass

	def Marshal(writer):
		pass

	def Unmarshal( reader):
		pass
# message Resp3212
class Resp3212:
	def __init__(self):
		self.protoid = 3212
		self.bpUUID = ""
		self.cmds = []
		self.difficulty = 0

	def Marshal(writer):
		writer.setString(self.bpUUID, 1)
		countcmds = len(self.cmds)
		writer.setArray(countcmds, 2)
		for i in range(countcmds):
			writer.setMessage(0)
			self.cmds[i].Marshal(writer)
			writer.endSetMessage()
		writer.setUint8(self.difficulty, 3)

	def Unmarshal( reader):
		self.bpUUID = reader.getString(1)
		for i in range(reader.getArray(2)):
			msg = AutoCmd() 
			reader.getMessage(0)
			msg.Unmarshal(reader)
			reader.endGetMessage()
			self.cmds.append(msg)
		self.difficulty = reader.getUint8(3)
# message MapData
class MapData:
	def __init__(self):
		self.protoid = 0
		self.craterId = 0
		self.pos = Point()

	def Marshal(writer):
		writer.setUint32(self.craterId, 1)
		writer.setMessage(2)
		self.pos.Marshal(writer)
		writer.endSetMessage()

	def Unmarshal( reader):
		self.craterId = reader.getUint32(1)
		reader.getMessage(2)
		self.pos.Unmarshal(reader)
		reader.endGetMessage()
# message Req3300
class Req3300:
	def __init__(self):
		self.protoid = 3300
		self.bid = ""
		self.playerId = 0
		self.battleType = 0

	def Marshal(writer):
		writer.setString(self.bid, 1)
		writer.setUint32(self.playerId, 2)
		writer.setUint8(self.battleType, 3)

	def Unmarshal( reader):
		self.bid = reader.getString(1)
		self.playerId = reader.getUint32(2)
		self.battleType = reader.getUint8(3)
# message Resp3300
class Resp3300:
	def __init__(self):
		self.protoid = 3300
		self.wind = 0
		self.curRound = 0
		self.roundTime = 0
		self.curActorBpUUIDs = []
		self.pvpRoomInfo = PVPRoomInfo()
		self.alive = RespBattleTeams()
		self.dead = RespBattleTeams()
		self.mapdata = []
		self.isFired = 0
		self.buffObjs = []
		self.isEnded = 0

	def Marshal(writer):
		writer.setInt8(self.wind, 1)
		writer.setUint16(self.curRound, 2)
		writer.setUint16(self.roundTime, 3)
		countcurActorBpUUIDs = len(self.curActorBpUUIDs)
		writer.setArray(countcurActorBpUUIDs, 4)
		for i in range(countcurActorBpUUIDs):
			writer.setString(self.curActorBpUUIDs[i], 0)
		writer.setMessage(5)
		self.pvpRoomInfo.Marshal(writer)
		writer.endSetMessage()
		writer.setMessage(6)
		self.alive.Marshal(writer)
		writer.endSetMessage()
		writer.setMessage(7)
		self.dead.Marshal(writer)
		writer.endSetMessage()
		countmapdata = len(self.mapdata)
		writer.setArray(countmapdata, 8)
		for i in range(countmapdata):
			writer.setMessage(0)
			self.mapdata[i].Marshal(writer)
			writer.endSetMessage()
		writer.setBool(self.isFired, 9)
		countbuffObjs = len(self.buffObjs)
		writer.setArray(countbuffObjs, 10)
		for i in range(countbuffObjs):
			writer.setMessage(0)
			self.buffObjs[i].Marshal(writer)
			writer.endSetMessage()
		writer.setBool(self.isEnded, 11)

	def Unmarshal( reader):
		self.wind = reader.getInt8(1)
		self.curRound = reader.getUint16(2)
		self.roundTime = reader.getUint16(3)
		for i in range(reader.getArray(4)):
			self.curActorBpUUIDs.append(reader.getString(0))
		reader.getMessage(5)
		self.pvpRoomInfo.Unmarshal(reader)
		reader.endGetMessage()
		reader.getMessage(6)
		self.alive.Unmarshal(reader)
		reader.endGetMessage()
		reader.getMessage(7)
		self.dead.Unmarshal(reader)
		reader.endGetMessage()
		for i in range(reader.getArray(8)):
			msg = MapData() 
			reader.getMessage(0)
			msg.Unmarshal(reader)
			reader.endGetMessage()
			self.mapdata.append(msg)
		self.isFired = reader.getBool(9)
		for i in range(reader.getArray(10)):
			msg = SkillBuffObj() 
			reader.getMessage(0)
			msg.Unmarshal(reader)
			reader.endGetMessage()
			self.buffObjs.append(msg)
		self.isEnded = reader.getBool(11)
# message BattleReport
class BattleReport:
	def __init__(self):
		self.protoid = 3310
		self.cmds = []
		self.battleType = 0
		self.pvpRoomInfo = PVPRoomInfo()

	def Marshal(writer):
		countcmds = len(self.cmds)
		writer.setArray(countcmds, 1)
		for i in range(countcmds):
			writer.setMessage(0)
			self.cmds[i].Marshal(writer)
			writer.endSetMessage()
		writer.setUint8(self.battleType, 2)
		writer.setMessage(3)
		self.pvpRoomInfo.Marshal(writer)
		writer.endSetMessage()

	def Unmarshal( reader):
		for i in range(reader.getArray(1)):
			msg = AutoCmdArray() 
			reader.getMessage(0)
			msg.Unmarshal(reader)
			reader.endGetMessage()
			self.cmds.append(msg)
		self.battleType = reader.getUint8(2)
		reader.getMessage(3)
		self.pvpRoomInfo.Unmarshal(reader)
		reader.endGetMessage()
